/**
 * FileName: EchoServerHandler
 * Author:   powersi
 * Date:     2021/3/1 17:53
 * Description:
 */
package com.demo.zm.netty.sample.echo;

import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import io.netty.util.concurrent.EventExecutorGroup;

/**
 * Description: 
 * Author:      powersi
 * Date:        2021/3/1 17:53
 */
public class EchoServerHandler extends SimpleChannelInboundHandler<String> {


    @Override
    protected void channelRead0(ChannelHandlerContext channelHandlerContext, String s) throws Exception {
        System.out.println("recv msg:  " + s);
        channelHandlerContext.writeAndFlush(s);

    }
}
